import Vue from 'vue'
import Vuex from 'vuex'
import map from '../utils/map'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: null,
    roleid: null,
    address: [],
    map,
    // belly
    agent: '',
    agenter: '',
    position: '',
    phone: '',
    role: '',
    passdata:[],
  },
  getters: {

  },
  mutations: {
    login (state, userInfo) {
      state.user = userInfo.user
      state.roleid = userInfo.roleid
      state.address = userInfo.adress
    }
  },
  actions: {

  }
})
